import request from '@/utils/request'

// 获取OTA任务列表
export function getWristbandList(query) {
  return request({
    url: `/wristband/list`,
    method: 'get',
    params: query
  })
}
// 用户根据OTA任务id获取详情
export function getWristbandById(id) {
  return request({
    url: `/wristband/${id}`,
    method: 'get',
  })
}

// 获取手环详情数据
export function getWristbandAdvByMac(query) {
  return request({
    url: `/wristband_adv/list_wb`,
    method: 'get',
    params: query
  })
}
export function getWristbandHistoryByMac(query) {
  return request({
    url: `/wristband_history/list_wb`,
    method: 'get',
    params: query
  })
}

// 根据手环MAC查实时最后一条数据
export function getWristbandAdvByMacLast(query) {
  return request({
    url: `/wristband_adv/list_wb_last`,
    method: 'get',
    params: query
  })
}
export function wristbandExportImg(data) {
  return request({
    url: '/wristband_adv/exportImg',
    method: 'post',
    data: data
  })
}
//导出图表的接口  请求参数和/wristband_adv/exportImg一样
export function exportData(data) {
  return request({
    url: '/wristband_adv/exportData',
    method: 'post',
    data: data
  })
}
